package com.zjitc.P1;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/13 14:07
 * @description:
 */
@PropertySource("classpath:db.properties")
@Component
public class DataSource {

  @Value("${jdbc.username}")
  private String username;

  @Value("${jdbc.password}")
  private String password;

  @Value("${jdbc.driver}")
  private String driver;

  @Value("${jdbc.jdbcUrl}")
  private String jdbcUrl;

  public String getUsername() {
    return username;
  }

  public String getPassword() {
    return password;
  }

  public String getDriver() {
    return driver;
  }

  public String getJdbcUrl() {
    return jdbcUrl;
  }
}
